"""
自动化测试哪些元素，就封装哪些元素
"""
from base.base import Base

username=("id","username")
pwd=("id","password")
code=("id","verify_code")
dl=("name","sbtbutton")
nc=('xpath',"//*[text()='荣耀黄金']")   #昵称用来断言
qd=("xpath","//*[@id='layui-layer1']/div[3]/a")

class PageLogin(Base):
    def page_username(self,value):
        self.base_input(username,value)

    def page_pwd(self,value):
        self.base_input(pwd,value)

    def page_code(self, value):
        self.base_input(code, value)

    def page_dl(self):
        self.base_click(dl)

    def page_text(self):
        return self.base_get_text(nc)

    def page_text1(self):
        return self.base_get_text(qd)


    def page_login(self,ph,mima,yzm):
        self.page_username(ph)
        self.page_pwd(mima)
        self.page_code(yzm)
        self.page_dl()











